package cn.hp.service;

import cn.hp.entity.Announcement;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface AnnouncementService {
    /**
     * 查询所有公告
     *
     * @return 第六步：创建AnnouncementServiceImpl
     * 第七步：创建AnnouncementController
     */
    List<Announcement> findAnnouncement(Announcement announcement);

    /**
     * 分页查询公告信息
     *
     * @param page  页码
     * @param limit 每页多少条
     * @return
     */
    PageInfo<Announcement> findAnnouncement(Announcement announcement, int page, int limit);

    /**
     * 新增公告信息
     *
     * @param announcement
     * @return
     */
    int insertAnnouncement(Announcement announcement);

    /**
     * 删除公告信息
     *
     * @param id 公告的id
     * @return
     */
    int deleteAnnouncementById(Integer id);

    /**
     * 修改公告信息
     *
     * @param announcement
     * @return
     */
    int updateAnnouncement(Announcement announcement);


}